pub mod error;
pub mod fund;
pub mod stock;
use std::time::Duration;
lazy_static::lazy_static! {
    // Single Client Instance
    // Using a single reqwest::Client instance is generally more efficient and recommended for the following reasons:
    //
    // Resource Management: Creating a reqwest::Client involves initializing TLS contexts, DNS resolvers, and other resources that can be expensive. Reusing a single instance ensures that these resources are initialized only once and reused, reducing overhead.
    // Connection Pooling: reqwest uses connection pooling internally to manage HTTP connections efficiently. Connections are reused across requests, which can significantly improve performance for subsequent requests to the same host. A single client instance allows you to benefit fully from connection pooling.
    // Concurrency Model: In asynchronous Rust applications using frameworks like Tokio, the concept of 'threads' is often abstracted away in favor of lightweight tasks managed by the runtime. A single client instance can be used concurrently across multiple tasks without the need for explicit thread safety measures, as long as you're using the asynchronous methods.
    static ref REQWEST_CLIENT: reqwest::Client = {
        let builder = reqwest::ClientBuilder::new()
        .connect_timeout(Duration::from_secs(5)) // Set the connection timeout to 5 seconds
        .timeout(Duration::from_secs(10)) // Set the total request timeout to 10 seconds
        // Additional configurations...
        ;
        builder.build().unwrap()
    };
}
